<template >
<div class="container">
  首页
</div>
</template>

<script>
// import api from '@/utils/api'
import { mapState, mapActions } from 'vuex'

export default {
  name: 'index',
  computed: {
    ...mapState([
      'newGoods',
      'hotGoods',
      'topics',
      'brands',
      'floorGoods',
      'banner',
      'channel'
    ])
  },
  async mounted () {
    await Promise.all([
      this.getIndexData()
    ])
  },

  methods: {
    ...mapActions([
      'getIndexData'
    ])
  },

  // 原生的分享功能
  onShareAppMessage: function () {
    return {
      title: '分享title',
      desc: '分享描述',
      path: '/pages/index/index'
    }
  }
}
</script>

<style lang="scss" scoped>
.container {
}

</style>
